{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// bar-chart.vg.json from https://gist.github.com/hadim/629b8fde56eac74c587136139a0dd5c2#file-bar-chart-vg-json\n",
    "\n",
    "import com.twosigma.beakerx.mimetype.MIMEContainer\n",
    "import groovy.json.JsonSlurper\n",
    "    \n",
    "fname = \"../resources/bar-chart.vg.json\"\n",
    "fileContents = new File(fname).text\n",
    "def jsonSlurper = new JsonSlurper()\n",
    "def json = jsonSlurper.parseText(fileContents)\n",
    "new MIMEContainer(\"application/vnd.vega.v2+json\", json)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Groovy",
   "language": "groovy",
   "name": "groovy"
  },
  "language_info": {
   "codemirror_mode": "groovy",
   "file_extension": ".groovy",
   "mimetype": "",
   "name": "Groovy",
   "nbconverter_exporter": "",
   "version": "2.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
